# 定义诗歌各部分内容
title = "            手机"
author = "          作者: 张军"
poem_lines = [
    "方寸荧屏万象罗，悲欢尘世掌中过。",
    "甜音频发真情烈，旧影重翻余味多。",
    "扫码订单挑好物，开机追剧乐斑皤。",
    "兴来可阅千秋史，更显神通识百科。"
]

# 计算合适的宽度（取最长诗句的长度作为基准）
max_length = max(len(line) for line in poem_lines)

# 居中打印标题和作者
print(title.center(max_length))
print(author.center(max_length))
print()  # 空行分隔

# 打印诗句
for line in poem_lines:
    print(line)
    